home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 5⁄11⁄90 / 1263-Get resources into f-May90 < prev    next >
Encoding:
Text File  |  1990-05-11  |  1.1 KB  |  33 lines  |  [TEXT/GEOL]

  1. Item    7464321                         8-May-90        11:33PDT
  2.  
  3. From:   DAWSON.M                        Dawson, Mark
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Get resources into files
  8.  
  9. I have a problem w/my resources getting into my saved file (they never show
  10. up).
  11.  
  12. My TDTextDocument::DoWrite() code looks like:
  13. Handle temp;
  14. FailOSErr(PtrToHand((Ptr)&fMyData,&temp,fMyDataLen);  // copy data into a hndl
  15. AddResource(temp,'tttt',1000,"\p");
  16. FailResError();
  17. long textBytes = fTextHdlLen;
  18. FailOSErr(FSWrite(aRefNum, &textBytes, (Ptr)*fTextHdl));
  19. inherited::DoWrite(aRefNum,makingCopy);
  20.  
  21. The FSWrite (to the data fork) works, but the AddResource doesn't seem to do
  22. anything (FailResError() isn't being executed, so it isn't failing).  ResEdit
  23. says there is no resource fork for the file.
  24.  
  25. I was writing both the text && the data to the data fork, but I decided to put
  26. the data into the resource fork, so I could make the file readble by text
  27. processing programs (i.e. 'TEXT' types).  Is there something I need to do to
  28. make MacApp write out the resource to the file?
  29.  
  30. Thanks,
  31.    Mark
  32.  
  33.